<div class="modal-header" id="scope">
	<h3 class="modal-title">站点排序</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body"></div>
			<div>
				<p class="m-l-sm">说明：
					<span class="text-danger">用鼠标拖动站点进行排序</span>，点击地址左侧图标指定上车点和下车点，起点和终点不可拖动。</p>
				<p class="m-l-sm">每一个站点都要填写上一站到当前站的时间（小时），起点站默认为0。</p>
			</div>
			<div class="form-group row m-n padder-md">
				<div class="col-xs-8">
					<label class="control-label">
						<span class="start">起</span>
					</label>
					<label class="control-label">{{param.start.address}}</label>
				</div>
				<div class="col-xs-3">
					<div class="input-group">
						<input type="text" class="form-control" placeholder="上一站到当前站的时间" ng-model="param.start.duration" ng-pattern="/^\d+(\.\d+)?$/" required
						 ng-readonly="true" />
						<span class="input-group-addon">小时</span>
					</div>
				</div>
			</div>
			<div class="wrapper-md" ng-if="list!=''">
				<ul ui-jq="sortable" id="list" class="list-group gutter list-group-lg list-group-sp m-n">
					<li class="list-group-item no-padder" ng-repeat="each in list" id="{{each.id}}" value="{{each}}">
						<div class="form-group row m-n">
							<div class="col-xs-8">
								<label class="control-label" ng-click="destination(each)">
									<span class="up" ng-show="!each.destination">上</span>
									<span class="down" ng-show="each.destination">下</span>
								</label>
								<label class="control-label">{{each.address}}</label>
							</div>
							<div class="col-xs-3">
								<div class="input-group">
									<input type="text" class="form-control" placeholder="上一站到当前站的时间" ng-model="each.duration" ng-pattern="/^\d+(\.\d+)?$/" required />
									<span class="input-group-addon">小时</span>
								</div>
							</div>
						</div>
					</li>
				</ul>
			</div>
			<div class="form-group row m-n padder-md">
				<div class="col-xs-8">
					<label class="control-label">
						<span class="termina">终</span>
					</label>
					<label class="control-label">{{param.termina.address}}</label>
				</div>
				<div class="col-xs-3">
					<div class="input-group">
						<input type="text" class="form-control" placeholder="上一站到当前站的时间" ng-model="param.termina.duration" ng-pattern="/^\d+(\.\d+)?$/" required/>
						<span class="input-group-addon">小时</span>
					</div>
				</div>
			</div>
		</div>
		<footer class="panel-footer text-right bg-light lter">
			<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
			<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
		</footer>
	</form>
</div>
<style>
	.start {
		width: 2.2rem;
		height: 2.2rem;
		line-height: 2.2rem;
		background-color: #49AAE6;
		color: #fff;
		border-radius: 50%;
		display: inline-block;
		text-align: center;
		font-size: 1.4rem;
	}

	.termina {
		width: 2.2rem;
		height: 2.2rem;
		line-height: 2.2rem;
		background-color: #70D7C6;
		color: #fff;
		border-radius: 50%;
		display: inline-block;
		text-align: center;
		font-size: 1.4rem;
	}

	.up {
		width: 2.2rem;
		height: 2.2rem;
		line-height: 2.2rem;
		background-color: #9AD0F1;
		color: #fff;
		border-radius: 50%;
		display: inline-block;
		text-align: center;
		font-size: 1.4rem;
	}

	.down {
		width: 2.2rem;
		height: 2.2rem;
		line-height: 2.2rem;
		background-color: #BDECE3;
		color: #fff;
		border-radius: 50%;
		display: inline-block;
		text-align: center;
		font-size: 1.4rem;
	}
</style>